/**
  ******************************************************************************
  * @file           : gui_task.c
  * @brief          : Main program body
  ******************************************************************************
  * @attention
  *
  ******************************************************************************
  */

/* Includes ------------------------------------------------------------------*/
#include "bsp.h"
#include "tskcfg.h"
#include "gui.h"

TaskHandle_t xGui_Thd = NULL;
StaticTask_t xGui_Tcb;
StackType_t  xGui_Stk[GUI_STACK_SIZE];


void vGui_Task( void * pvParameters )
{
  Lcd_Init();
  
  GUI_FormExec(&Gui_FrmMainmenu);
  
	while(1)
	{
    if(Gui_FormCurrent->update != NULL)
    {
      Gui_FormCurrent->update(NULL);
    }
    
    Lcd_Refresh();
    
    vTaskDelay(Gui_FormCurrent->refresh);
	}
}
